/**
 * Site header
 */
.site-header {
    border-top: 5px solid $brand-color;
    border-bottom: 1px solid $grey-color-dark;
    min-height: 56px;

    // Positioning context for the mobile navigation icon
    position: relative;
}

.site-title {
    font-size: 26px;
    font-weight: 300;
    line-height: 56px;
    letter-spacing: -1px;
    margin-bottom: 0;
    float: left;

    &,
    &:visited {
        color: $brand-color;
    }
    &:hover {
        color: $brand-color-dark;
    }
}

.site-nav {
    float: right;
    line-height: 56px;

    .menu-icon {
        display: none;
    }

    .page-link {
        color: $text-color;
        line-height: $base-line-height;

        // Gaps between nav items, but not on the last one
        &:not(:last-child) {
            margin-right: 20px;
        }
		
		&:hover {
			color: $brand-color-dark;
		}
    }

    @include media-query($on-palm) {
        position: absolute;
        top: 9px;
        right: $spacing-unit;
        background-color: $background-color;
        border: 1px solid $grey-color-light;
        border-radius: 5px;
        text-align: right;

        .menu-icon {
            display: block;
            float: right;
            width: 36px;
            height: 26px;
            line-height: 0;
            padding-top: 10px;
            text-align: center;

            > svg {
                width: 18px;
                height: 15px;

                path {
                    fill: $text-color;
                }
            }
        }

        .trigger {
            clear: both;
            display: none;
        }

        &:hover .trigger {
            display: block;
            padding-bottom: 5px;
        }

        .page-link {
            display: block;
            padding: 5px 10px;

            &:not(:last-child) {
                margin-right: 0;
            }
            margin-left: 20px;
        }
    }
}



/**
 * Site footer
 */
.site-footer {
    border-top: 1px solid $grey-color-dark;
    padding: $spacing-unit-lg 0;

    h2 {
        color: $text-color-dark;
    }
}

.footer-heading {
    font-size: 18px;
    margin-bottom: $spacing-unit;
}

.contact-list,
.social-media-list {
    list-style: none;
    margin-left: 0;
}

.footer-col-wrapper {
    font-size: 15px;
    color: $text-color-dark;
    margin-left: -$spacing-unit;
    @extend %clearfix;

    a {
        color: $text-color;
        
        &:hover {
            color: $brand-color;
        }
    }
}

.footer-col {
    float: left;
    margin-bottom: $spacing-unit;
    padding-left: $spacing-unit;
}

.footer-col-1 {
    width: -webkit-calc(35% - #{$spacing-unit});
    width:         calc(35% - #{$spacing-unit});
}

.footer-col-2 {
    width: -webkit-calc(20% - #{$spacing-unit});
    width:         calc(20% - #{$spacing-unit});
}

.footer-col-3 {
    width: -webkit-calc(45% - #{$spacing-unit});
    width:         calc(45% - #{$spacing-unit});
}

.footer-other {
    color: grey;

    .footer-icp {
        font-size: 80%;
        a {color: inherit}
    }
}



@include media-query($on-laptop) {
    .footer-col-1,
    .footer-col-2 {
        width: -webkit-calc(50% - #{$spacing-unit});
        width:         calc(50% - #{$spacing-unit});
    }

    .footer-col-3 {
        width: -webkit-calc(100% - #{$spacing-unit});
        width:         calc(100% - #{$spacing-unit});
    }
}

@include media-query($on-palm) {
    .footer-col {
        float: none;
        width: -webkit-calc(100% - #{$spacing-unit});
        width:         calc(100% - #{$spacing-unit});
    }
}



/**
 * Page content
 */
.page-content {
    padding: $spacing-unit 0;
}

.page-heading {
    font-size: 20px;
}

.post-list {
    margin-left: 0;
    margin: 0;
    list-style: none;

    > li {
        margin-bottom: calc(#{$spacing-unit}/4);
		padding: calc(#{$spacing-unit}/16);
		background: linear-gradient(to right, $blank-color, $background-color);
		border-left: 5px solid $blank-color;
		padding-left: 10px;
		transition: all .2s;
		
		&:hover {
			background: linear-gradient(to right, $blank-color, $blank-color);
			border-left: 5px solid $brand-color;
		}

        > a {
            color: $text-color;
            &:hover {
                color: $brand-color;
            }
        }
    }
}

.post-meta {
    font-size: $small-font-size;
    color: $grey-color-light;
	margin-right: 0px;
	&:not(:last-child) {	
		margin-right: 15px;
	}
	
	> time {
		&:not(:last-child) {
			margin-right:10px;
		}
	}
}

.post-link {
    display: block;
    font-size: 24px;
}


/**
 * paginate
 */
.pagination {
    text-align: center;
}
.pagination img {
    width: 100%;
    height: 3em;
}
.previous,.next {
    color: $text-color;
    font-size: 1em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.625em;
    border-radius: 0.3125em;
    /*border: 1px solid #333;*/
    box-shadow: 0 1px 3px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5);
    background: #777;
}
a.previous:hover, a.next:hover{
    color: $text-color-light;
    background: #888;
}
span.previous, span.next {
    cursor: not-allowed;
}





/**
 * Posts
 */
.post-header {
    text-align: center;
    margin-bottom: $spacing-unit;

    h1 {
        font-weight: bold;  
    }
}

.post-title {
    font-size: 42px;
    letter-spacing: -1px;
    line-height: 1;

    @include media-query($on-laptop) {
        font-size: 36px;
    }
}

.post-content {
    margin-bottom: $spacing-unit-lg;
    counter-reset: section;

    h2, h3, h4 {
        font-weight: bold;
    }


    h2 {
        font-size: 32px;
        counter-reset: subsection;

        @include media-query($on-laptop) {
            font-size: 28px;
        }
    }

    h3 {
        font-size: 26px;
        counter-reset: ssubsection;

        @include media-query($on-laptop) {
            font-size: 22px;
        }
    }

    h4 {
        font-size: 20px;

        @include media-query($on-laptop) {
            font-size: 18px;
        }
    }

    h2:before{
        counter-increment:section;
        content:counter(section) " ";

    }
    h3:before{
        counter-increment:subsection;
        content: counter(section) "." counter(subsection) " ";
    }
    h4:before{
        counter-increment:subsection;
        content: counter(section) "." counter(subsection) "."counter(ssubsection) " ";
    }
}
